package com.yuwei.module_cash_desk.adapter

import android.widget.CheckBox
import com.bw.lib_http.entity.ChargeEntityItem
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.yuwei.module_cash_desk.R

class ChargeAdapter: BaseQuickAdapter<ChargeEntityItem,BaseViewHolder>(R.layout.item_charge) {
    override fun convert(holder: BaseViewHolder, item: ChargeEntityItem) {
        holder.setText(R.id.chargeType,item.chargeType)
        holder.setText(R.id.chargeAmount,"￥${item.chargeAmount}")
        holder.setText(R.id.paymentTime,item.paymentTime)
        val checkBox = holder.getView<CheckBox>(R.id.check)
        checkBox.isChecked = item.isChecked
    }
}